/*!
 * \file GapEventMediaBearerSetupRej.h
 * \brief Event carrying message GapMediaBearerSetupRej
 */

#ifndef SGW_GAP_EVENT_MEDIA_BEARER_SETUP_REJ_H
#define SGW_GAP_EVENT_MEDIA_BEARER_SETUP_REJ_H

#include "EventData.h"
#include "GapGlobals.h"
#include "GAP.pb.h"

namespace tsc
{
namespace sgw
{

using GatewayApplicationPart::GapMediaBearerSetupReject;

/**
 * Event indicating that MGW and have rejected setting up of media bearer
 */
class GapEventMediaBearerSetupRej : public common::EventData
{
public:

    GapEventMediaBearerSetupRej(
            GapMediaBearerSetupReject& bearerSetupRej) :
		EventData(GAP_MEDIA_BEARER_SETUP_REJ),
		mConnectionId(bearerSetupRej.connectionid()),
		mCause(bearerSetupRej.cause())
	{

	}

	virtual ~GapEventMediaBearerSetupRej()
	{

	}

	uint32_t getConnectionId() const
	{
		return mConnectionId;
	}

	GatewayApplicationPart::Cause getCause() const
    {
        return mCause;
    }

private:
	uint32_t mConnectionId;
	GatewayApplicationPart::Cause mCause;
};

} // namespace sgw
} // namespace tsc

#endif // SGW_GAP_EVENT_MEDIA_BEARER_SETUP_REJ_H
